#pragma once

#include "common.h"
#include "LfsrRegister.h"
#include "Algebra.h"

namespace MatrixTests
{
	template<int size = 2>
	class BruteIterator 
		: public SimpleIterator<LfsrRegister<size>>
	{
	public:
		typedef LfsrRegister<size> Configuration;

		BruteIterator(const Configuration &last) : _last(last), _current(last) {}
		
		bool moveNext()
		{
			_current.increment();
			return _current != _last;
		}

		Configuration current() const
		{
			return _current;
		}
	private:
		Configuration _last;
		Configuration _current;
	};

	//template
	//<
	//	class TGenerator, 
	//	class TResult = int, 
	//	class Comparer = typename generator_traits<TGenerator>::ConfigurationComparer
	//>
	//class ResultStorageAndPrint
	//	: public SimpleResultStorage<TGenerator, TResult, Comparer>
	//{
	//};

	//template<int size, class TResult, class Comparer>
	//class ResultStorageAndPrint<MatrixSelfGenerator<size>, TResult, Comparer>
	//	: public SimpleResultStorage<MatrixSelfGenerator<size>, TResult, Comparer>
	//{
	//public:

	//	void store(const Configuration &c, const TResult &r)
	//	{
	//		SimpleResultStorage<TGenerator, TResult, Comparer>::store(c, r);
	//		std::cout << c.toString() << std::endl;
	//	}
	//};

	void defaultTest(IAlgebra *algebra);
}